//
//  ONShareManager.swift
//  OnceNectar
//
//  Created by Zhang Dream on 17/06/2018.
//  Copyright © 2018 com.inwhoop. All rights reserved.
//

import Foundation

class ONShareManager: NSObject{
    
    //弹出分享面板
    static func showShareMenuViewInWindowWithPlatformSelectionBlock(selectionBlock:@escaping (_ platformType:UMSocialPlatformType, _ userinfo:Any?) -> Void) -> Void {
        UMSocialUIManager.showShareMenuViewInWindow { (platformType, userinfo) in
            selectionBlock(platformType,userinfo);
        }
    }
    
    //设置预定义平台
    //备注:preDefinePlatforms为[NSNumber]的类型
    static func setPreDefinePlatforms(_ preDefinePlatforms: [Any]!) -> Void {
        //调用setPreDefinePlatforms的示例
        //        UMSocialUIManager.setPreDefinePlatforms(
        //            [NSNumber(integerLiteral:UMSocialPlatformType.wechatSession.rawValue)
        //            ,NSNumber(integerLiteral:UMSocialPlatformType.QQ.rawValue)
        //            ,NSNumber(integerLiteral:UMSocialPlatformType.sina.rawValue)
        //            ]
        //        )
        UMSocialUIManager.setPreDefinePlatforms(preDefinePlatforms)
    }
    
}

